import axios from 'axios';
import { loginreq, req } from './axiosFun';

// 登录接口
export const login = (params) => { return loginreq("post", "/api/admin/login", JSON.stringify(params)) };

 // 获取用户
 export const List = (page, pagesize) => { return req("get", "/api/user/list?page=" + page + "&pagesize=" + pagesize)};
 // 删除用户
 export const Delete = (id) => { return req("post", "/api/user/delete", {id: id})};
 // 添加用户
 export const Add = (form) => { return req("post", "/api/user/add", JSON.stringify(form))};
 // 更新用户
 export const Update = (form) => { return req("post", "/api/user/update", JSON.stringify(form))};



